/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * ButtonAction.java
 *
 * Created on 2010-10-31, 22:20:35
 */

package com.weed.components; 

/**
 *
 * @author Jason
 */
public class ButtonAction extends javax.swing.JPanel {

    /** Creates new form ButtonAction */
    public ButtonAction() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        rButtonGroup1 = new com.weed.client.component.RButtonGroup();
        rButtonGroup2 = new com.weed.client.component.RButtonGroup();
        rDirChooser1 = new com.weed.client.component.ext.RDirChooser();
        rButton1 = new com.weed.client.component.ext.RButton();
        rButton2 = new com.weed.client.component.ext.RButton();
        rToolBarButton1 = new com.weed.client.component.bar.RToolBarButton();
        rToolBarButton2 = new com.weed.client.component.bar.RToolBarButton();
        rPanel1 = new com.weed.client.component.ext.RPanel();
        rCheckBox1 = new com.weed.client.component.RCheckBox();
        rCheckBox2 = new com.weed.client.component.RCheckBox();
        rCheckBox3 = new com.weed.client.component.RCheckBox();
        rCheckBox4 = new com.weed.client.component.RCheckBox();
        rPanel2 = new com.weed.client.component.ext.RPanel();
        rRadioButton1 = new com.weed.client.component.RRadioButton();
        rRadioButton2 = new com.weed.client.component.RRadioButton();
        rRadioButton3 = new com.weed.client.component.RRadioButton();
        rRadioButton4 = new com.weed.client.component.RRadioButton();
        rHeader1 = new com.weed.client.component.ext.RHeader();
        rScrollPane2 = new com.weed.client.component.ext.RScrollPane();
        rList1 = new com.weed.client.component.RList();

        setBackground(new java.awt.Color(255, 255, 255));

        rButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/weed/components/images/tick.png"))); // NOI18N
        rButton1.setText("Enable");

        rButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/weed/components/images/tick.png"))); // NOI18N
        rButton2.setText("Disable");
        rButton2.setEnabled(false);

        rToolBarButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/weed/components/images/tick.png"))); // NOI18N
        rToolBarButton1.setText("Group2");
        rButtonGroup1.add(rToolBarButton1);

        rToolBarButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/weed/components/images/tick.png"))); // NOI18N
        rToolBarButton2.setText("Group1");
        rButtonGroup1.add(rToolBarButton2);

        rPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "多选栏", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.TOP, new java.awt.Font("微软雅黑", 0, 12))); // NOI18N
        rPanel1.setOpaque(false);

        rCheckBox1.setText("多选1");
        rCheckBox1.setOpaque(false);

        rCheckBox2.setText("多选2");
        rCheckBox2.setOpaque(false);

        rCheckBox3.setText("多选3");
        rCheckBox3.setOpaque(false);

        rCheckBox4.setText("多选4");
        rCheckBox4.setOpaque(false);

        javax.swing.GroupLayout rPanel1Layout = new javax.swing.GroupLayout(rPanel1);
        rPanel1.setLayout(rPanel1Layout);
        rPanel1Layout.setHorizontalGroup(
            rPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(rPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(rCheckBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(rCheckBox2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(rCheckBox3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(rCheckBox4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(14, Short.MAX_VALUE))
        );
        rPanel1Layout.setVerticalGroup(
            rPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(rPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(rPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(rCheckBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(rCheckBox2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(rCheckBox3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(rCheckBox4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(14, Short.MAX_VALUE))
        );

        rPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "单选框", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.TOP, new java.awt.Font("微软雅黑", 0, 12))); // NOI18N
        rPanel2.setOpaque(false);

        rButtonGroup2.add(rRadioButton1);
        rRadioButton1.setText("单选1");
        rRadioButton1.setOpaque(false);
        rRadioButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rRadioButton1ActionPerformed(evt);
            }
        });

        rButtonGroup2.add(rRadioButton2);
        rRadioButton2.setText("单选2");
        rRadioButton2.setOpaque(false);

        rButtonGroup2.add(rRadioButton3);
        rRadioButton3.setText("单选3");
        rRadioButton3.setOpaque(false);

        rButtonGroup2.add(rRadioButton4);
        rRadioButton4.setText("单选4");
        rRadioButton4.setOpaque(false);

        javax.swing.GroupLayout rPanel2Layout = new javax.swing.GroupLayout(rPanel2);
        rPanel2.setLayout(rPanel2Layout);
        rPanel2Layout.setHorizontalGroup(
            rPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(rPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(rRadioButton1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(rRadioButton2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(rRadioButton3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(rRadioButton4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(47, Short.MAX_VALUE))
        );
        rPanel2Layout.setVerticalGroup(
            rPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, rPanel2Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(rPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(rRadioButton1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(rRadioButton2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(rRadioButton3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(rRadioButton4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        rHeader1.setDescription("这个是一标题带有描述的组件，目的是可以更方便的使用。");
        rHeader1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/weed/components/images/table.png"))); // NOI18N
        rHeader1.setOpaque(false);
        rHeader1.setTitle("这是一个标题");

        rScrollPane2.setHeaderIcon(new javax.swing.ImageIcon(getClass().getResource("/com/weed/components/images/tick.png"))); // NOI18N
        rScrollPane2.setHeaderText("面板内容");

        rList1.setModel(new javax.swing.AbstractListModel() {
            String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };
            public int getSize() { return strings.length; }
            public Object getElementAt(int i) { return strings[i]; }
        });
        rScrollPane2.setViewportView(rList1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(rButton1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(rButton2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(rToolBarButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(rToolBarButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(rPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(rPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(rHeader1, javax.swing.GroupLayout.PREFERRED_SIZE, 434, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(231, 231, 231)
                        .addComponent(rScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(89, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(rButton1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(rButton2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(rToolBarButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(rToolBarButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addComponent(rPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(rPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(rScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 0, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 190, Short.MAX_VALUE)
                .addComponent(rHeader1, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
    }// </editor-fold>//GEN-END:initComponents

    private void rRadioButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rRadioButton1ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_rRadioButton1ActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private com.weed.client.component.ext.RButton rButton1;
    private com.weed.client.component.ext.RButton rButton2;
    private com.weed.client.component.RButtonGroup rButtonGroup1;
    private com.weed.client.component.RButtonGroup rButtonGroup2;
    private com.weed.client.component.RCheckBox rCheckBox1;
    private com.weed.client.component.RCheckBox rCheckBox2;
    private com.weed.client.component.RCheckBox rCheckBox3;
    private com.weed.client.component.RCheckBox rCheckBox4;
    private com.weed.client.component.ext.RDirChooser rDirChooser1;
    private com.weed.client.component.ext.RHeader rHeader1;
    private com.weed.client.component.RList rList1;
    private com.weed.client.component.ext.RPanel rPanel1;
    private com.weed.client.component.ext.RPanel rPanel2;
    private com.weed.client.component.RRadioButton rRadioButton1;
    private com.weed.client.component.RRadioButton rRadioButton2;
    private com.weed.client.component.RRadioButton rRadioButton3;
    private com.weed.client.component.RRadioButton rRadioButton4;
    private com.weed.client.component.ext.RScrollPane rScrollPane2;
    private com.weed.client.component.bar.RToolBarButton rToolBarButton1;
    private com.weed.client.component.bar.RToolBarButton rToolBarButton2;
    // End of variables declaration//GEN-END:variables

}
